Skip to content

more fixes#1040

Merged
henrydingliu merged 1 commit into
casact:disposal_rate_methodfrom
henrydingliu:disposal
Jun 21, 2026
Merged

more fixes#1040
henrydingliu merged 1 commit into
casact:disposal_rate_methodfrom
henrydingliu:disposal

Conversation

@henrydingliu

@henrydingliu henrydingliu commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

Summary of Changes

Related GitHub Issue(s)

Additional Context for Reviewers

  • I passed tests locally for both code (uv run pytest) and documentation changes (uv run jb build docs --builder=custom --custom-builder=doctest)

Note

Medium Risk
Changes disposal-rate estimation math in fit(), which drives forecast patterns and full_triangle_; scope is small but actuarially meaningful.

Overview
DisposalRate.fit now converts the input triangle to cumulative (incr_to_cum()) before building disposal_rate_tri and the internal X_ used for development weighting, so disposal rates are cumulative loss ÷ ultimate even when callers pass incremental data.

The sparse test_sparse_transform keeps sample_weight on the sparse backend explicitly when calling fit_transform, matching how production sparse pipelines should pass ultimates.

Reviewed by Cursor Bugbot for commit 6eb6afd. Bugbot is set up for automated code reviews on this repo. Configure here.

@henrydingliu henrydingliu marked this pull request as ready for review June 21, 2026 09:07
@henrydingliu henrydingliu merged commit ba539b1 into casact:disposal_rate_method Jun 21, 2026
8 checks passed
@codecov

codecov Bot commented Jun 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.27%. Comparing base (0c1830d) to head (6eb6afd).
⚠️ Report is 2 commits behind head on disposal_rate_method.

Additional details and impacted files
@@                   Coverage Diff                    @@
##           disposal_rate_method    #1040      +/-   ##
========================================================
+ Coverage                 89.24%   89.27%   +0.03%     
========================================================
  Files                        91       91              
  Lines                      5233     5233              
  Branches                    666      666              
========================================================
+ Hits                       4670     4672       +2     
+ Misses                      396      393       -3     
- Partials                    167      168       +1     
Flag Coverage Δ
unittests 89.27% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant